
#include "Character.h"

Character::Character()
{

   // set these values in inherited classes
   damage = 0;
   health = 0;


   attacking = false;
   moving_right = false;
   jumped = false;
   dead = false;
   on_block = false;
   landed = true;
}

Character::~Character()
{
}

void Character::Draw( int x, int y)
{
}

void Character::Draw( int bgX3, int y, int player_level_x, Character *player )
{
}

void Character::Move_frame()
{
}

bool Character::Is_attacking()
{
    return attacking;
}

bool Character::Is_moving_right()
{
    return moving_right;
}

bool Character::Is_jumping()
{
    return jumped;
}

bool Character::Landed()
{
    return landed;
}

bool Character::Is_dead()
{
    return dead;
}

void Character::Set_landed( bool landed )
{
    this->landed = landed;
}

void Character::Set_attacking( bool attacking )
{
    this->attacking = attacking;
}

void Character::Set_moving_right( bool moving_right )
{
    this->moving_right = moving_right;
}

void Character::Set_jumping( bool jumped )
{
    this->jumped=jumped;

}

int Character::Get_health()
{
    return health;
}

int Character::Get_damage()
{
    return damage;
}

void Character::Take_from_health( int amount )
{
    health -= amount;
    if( health <= 0 )
        dead = true;
}

SDL_Rect Character::Get_sprite_info()
{
    return sprite_info;
}

bool Character::Is_on_block()
{
    return on_block;
}

void Character::Set_on_block( bool on_top_block )
{
    on_block = on_top_block;
}
